HADOOP-19861. Migrate hadoop-cos from javax.annotation to jakarta.#8421
HADOOP-19861. Migrate hadoop-cos from javax.annotation to jakarta.#8421slfan1989 wants to merge 1 commit intoapache:trunkfrom
Conversation
|
@steveloughran @pan3793 I will continue to push forward work related to future JDK compatibility. One area we need to pay attention to is the migration from |
There was a problem hiding this comment.
Pull request overview
Migrates the hadoop-cos connector from javax.annotation.Nullable to jakarta.annotation.Nullable as part of the Jakarta EE namespace transition.
Changes:
- Add
jakarta.annotation:jakarta.annotation-api:2.1.1tohadoop-projectdependency management. - Add
jakarta.annotation-apias a dependency ofhadoop-cos. - Update
Nullableimports in thehadoop-coscredentials provider classes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
hadoop-project/pom.xml |
Adds managed version for jakarta.annotation-api so modules can inherit a consistent version. |
hadoop-cloud-storage-project/hadoop-cos/pom.xml |
Declares the jakarta.annotation-api dependency needed by hadoop-cos sources. |
.../AbstractCOSCredentialsProvider.java |
Switches @Nullable import to jakarta.annotation.Nullable. |
.../EnvironmentVariableCredentialsProvider.java |
Switches @Nullable import to jakarta.annotation.Nullable. |
.../SimpleCredentialsProvider.java |
Switches @Nullable import to jakarta.annotation.Nullable. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <dependency> | ||
| <groupId>jakarta.annotation</groupId> | ||
| <artifactId>jakarta.annotation-api</artifactId> | ||
| </dependency> | ||
|
|
There was a problem hiding this comment.
This PR introduces a new third-party dependency (jakarta.annotation:jakarta.annotation-api). It is not currently listed in LICENSE-binary, and there is no corresponding license text under licenses-binary/, so the binary licensing metadata will likely be out of date once this jar is bundled. Please add the dependency to LICENSE-binary under the appropriate license section and include the matching license file in licenses-binary/ (and NOTICE-binary if required by the dependency’s notice terms).
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
maybe we should move to jspecify instead, which has been adopted by:
|
|
@pan3793 I understand the suggestion to use cc: @steveloughran |
|
💔 -1 overall
This message was automatically generated. |
Description of PR
Background
The
hadoop-cosmodule currently usesjavax.annotation.Nullablefrom the legacyjavax.annotation-apipackage. As part of the Jakarta EE transition, we should migrate tojakarta.annotation.Nullable.Changes
This patch migrates the
hadoop-cosmodule fromjavax.annotationtojakarta.annotationwith minimal changes:jakarta.annotation:jakarta.annotation-api:2.1.1to parent POM (hadoop-project/pom.xml) dependency managementjakarta.annotation-apidependency inhadoop-cosmodule POM (version inherited from parent)javax.annotation-apiin parent for other modules (coexistence is acceptable for now)javax.annotation.Nullableimports withjakarta.annotation.Nullablein 3 files:Compatibility
jakarta.annotation-api2.x usesjakarta.annotation.*namespacejavax.annotation-apiandjakarta.annotation-apican coexist in classpathHow was this patch tested?
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
If an AI tool was used:
where is the name of the AI tool used.
https://www.apache.org/legal/generative-tooling.html